<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@include file="/comm/header.jsp"%>
<div class="container">
    <div class="panel panel-primary">
        <div class="panel-heading" data-toggle="collapse" data-target=".panel-body">
            <h3 class="panel-title" id="aaa">查询条件
                <span class="caret pull-right"></span>
            </h3>
        </div>
        <div class="panel-body">
            <form class="form-inline" id="queryForm">

                <div class="form-group">
                    <label>用户名：</label>
                    <input type="text" class="form-control" name="username">
                </div>

                <div class="form-group">
                    <label>角色：</label>
                    <select class="form-control" name="roleId">
                        <option value="">不限</option>
                    </select>
                </div>
                <div class="form-group">
                    <label>起始日期：</label>
                    <input type="date" name="startDate" class="form-control">
                </div>
                <div class="form-group">
                    <label>结束日期：</label>
                    <input type="date" name="endDate" class="form-control">
                </div>



                <button type="button" onclick="queryUser()" class="btn btn-primary"><i class="glyphicon glyphicon-search"></i> 查询</button>
            </form>
        </div>
    </div>
    <div id="toolbar">
        <button type="button"class="btn btn-primary">添加用户</button>
        <button type="button"class="btn btn-success" onclick="grant()">用户授权</button>
    </div>
    <table id="userTb"
           data-toggle="table"
           data-striped="true"
           data-url="sys/user/query"
           data-height="400"
           data-toolbar="#toolbar"
           data-pagination="true"
           data-side-pagination="server"
           data-page-size="4"
           data-page-list="[4,8,12]"
           data-query-params="queryParams"
           data-detail-view="true"
           data-detail-formatter="detailFormatter"
    >
        <thead>
        <tr>
            <th data-checkbox="true"></th>
            <th data-field="id">编号</th>
            <th data-field="username">用户名</th>
            <th data-field="gender" data-formatter="fmtGender">性别</th>
            <th data-field="creationDate">创建日期</th>
            <th data-field="role" data-formatter="fmtRole">角色</th>
            <th data-formatter="actionFormatter" data-evens="actionEvents">操作</th>
        </tr>
        </thead>
    </table>

    <div id="grant">
        <table data-toggle="table"
               data-url="sys/role/list"
               data-height="300"
        >
            <thead>
            <tr>
                <th data-radio="true"></th>
                <th data-field="roleName">角色名称</th>
                <th data-field="roleCode">角色代号</th>
            </tr>
            </thead>
        </table>
    </div>


</div>
<%@include file="/comm/footer.jsp"%>
<script src="static/script/user.js"></script>
